.TH E1432_CHECK_OVERLOADS 3 E1432
.SH NAME
e1432_check_overloads \- Check for overload and under-range
.IX e1432_check_overloads(3) 3
.SH SYNOPSIS
.cS
SHORTSIZ16 e1432_check_overloads(E1432ID hw, SHORTSIZ16 ID,
                                 SHORTSIZ16 *any, SHORTSIZ16 *comm,
                                 SHORTSIZ16 *diff, SHORTSIZ16 *half)
.cE
.SH DESCRIPTION

\fIe1432_check_overloads\fR queries the overload/under-range registers
and returns status information using four pointers.  The first pointer
location \fIany\fR will be non-zero if any overload occured (the
\fIany\fR parameter does not get set for half-range condition, only
overload).  The other three pointer locations will be filled with
arrays of TRUE/FALSE flags, one per active channel in the original
channel list used in e1432_create_channel_group().  Any of the four
pointers can be NULL if that information is not wanted.

This function is meant to be used for real-time updating of the
current overload status of channels.  It returns the "recent" overload
status of the channels.  "Recent" is defined to be one blocksize worth
of data points.  Unlike the E1431 Host Interface library, calling this
function does not clear the overload status.  Also unlike the E1431
function, this function does not have separate information about ADC
overloads versus other kinds of differential overloads.  Also unlike
the E1431 function, this function provides information about whether a
channel is under-ranged.

To instead get the overload status for a particular block of data, use
\fIe1432_set_append_status\fR, and get the overload status from the
trailer data.

If this function is given a group ID, it returns overload status only
for active channels in that group.  The arrays pointed to by
\fIcomm\fR, \fIdiff\fR, and \fIhalf\fR must be large enough to hold
information for all of these active channels.

\fIhw\fR must be the result of a successful call to
\fIe1432_assign_channel_numbers\fR, and specifies the group of
hardware to talk to.

\fIID\fR is the ID of a group or single channel.

\fIany\fR is a pointer to SHORTSIZ16 that is set by any overload
(i.e. if any element of \fIcomm\fR or \fIdiff\fR is set).  \fIany\fR
can be NULL if the information is not desired.

\fIcomm\fR is a pointer to SHORTSIZ16 that is set by a common mode
input overload.  \fIcomm\fR can be NULL if the information is not
desired.

\fIdiff\fR is a pointer to SHORTSIZ16 that is set by a differential
mode input overload.  \fIdiff\fR can be NULL if the information is not
desired.

\fIhalf\fR is a pointer to SHORTSIZ16 that is set when the signal is
not under-ranged.  \fIhalf\fR can be NULL if the information is not
desired.

.SH EXAMPLE
.cS

    SHORTSIZ16 any, error;
    SHORTSIZ16 comm[5];
    SHORTSIZ16 diff[5];
    SHORTSIZ16 half[5];

    /* assuming groupID is a group with 5 active channels */
    error = e1432_check_overloads(hw, groupID, &any, comm, diff, half);

.cE
.SH "RESET VALUE"
Not applicable.
.SH "RETURN VALUE"
Return 0 if successful, a (negative) error number otherwise.
.SH "SEE ALSO"
.na
e1432_read_raw_data, e1432_set_append_status
.ad
